package com.pureut.storage.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pureut.storage.domain.PickingPurchaseDetail;
import com.pureut.storage.dto.PickingPurchaseDetailListDto;
import com.pureut.storage.vo.PickingPurchaseDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: CM
 * @date: 2022/12/30    13:51
 */
@Mapper
public interface PickingPurchaseDetailMapper extends BaseMapper<PickingPurchaseDetail> {

    /**
     * 采购退货查询
     * @param pickingPurchaseDetailVo
     * @return
     */
    List<PickingPurchaseDetail> getPickingPurchaseDetailList(@Param("pickingPurchaseDetailVo") PickingPurchaseDetailVo pickingPurchaseDetailVo);

    /**
     * 查询采购退货明细列表
     * @param docNum
     * @return
     */
    List<PickingPurchaseDetailListDto> getPurchaseList(String docNum);

    /**
     * 查询当前单号下批次的净重之和
     * @param inputValue
     * @param docNum
     * @return
     */
    Double getNetWeight(@Param("inputValue") String inputValue,@Param("docNum") String docNum);

    /**
     * 查询当前单据号下对应的净重之和
     * @param inputValue
     * @return
     */
    Double getDoc(String inputValue);

    Double getPici(@Param("inputValue") String inputValue,@Param("docNum") String docNum);

    /**
     * 获取采购退货单产品号码
     * @param id
     * @return
     */
    PickingPurchaseDetail getKw(Long id);
}
